package com.mars.basic.allmain.vo;

import com.mars.basic.allmain.entity.RoleEntity;
import com.mars.basic.allmain.po.Role;
import com.mars.common.utils.Beans;
import lombok.Data;

import java.util.Date;
@Data
public class RoleVo {
    private Integer id;

    private  String name;

    private String type;

    private String status;

    private Date createTime;

    private Date updateTime;

    public RoleEntity build(){
        Role build = Role.builder().name(name)
                .createTime(new Date())
                .updateTime(new Date())
                .status("0")
                .build();
       return Beans.mapper(build,RoleEntity.class);
    }
}
